package com.winit.flow.model;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Map;

/**
 * 流程
 */
@Entity
@Table(name = "matrix_flow")
@DynamicUpdate
@DynamicInsert
public class Flow implements Serializable {
    @Id
    @Column(name = "id")
    private String id;
    @Column(name = "name")
    private String name;    //流程名称
    @Column(name = "attr_config_id")
    private String attrConfigId;  //流程内节点的布局信息保存在config中
    @Column(name = "bussiness_id")
    private String bussinessId;    //流程所属业务架构id
    @Column(name = "status")
    private String status;  //流程的状态 add/update/online/节点变更

    @Transient
    private Map<String, Object> attrs;

    @Transient
    private String reqId;

    @Transient
    private String parentId;

    @Transient
    private String frameName;

    public String getFrameName() {
        return frameName;
    }

    public void setFrameName(String frameName) {
        this.frameName = frameName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getReqId() {
        return reqId;
    }

    public void setReqId(String reqId) {
        this.reqId = reqId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAttrConfigId() {
        return attrConfigId;
    }

    public void setAttrConfigId(String attrConfigId) {
        this.attrConfigId = attrConfigId;
    }

    public String getBussinessId() {
        return bussinessId;
    }

    public void setBussinessId(String bussinessId) {
        this.bussinessId = bussinessId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Map<String, Object> getAttrs() {
        return attrs;
    }

    public void setAttrs(Map<String, Object> attrs) {
        this.attrs = attrs;
    }
}
